The present invention relates to an effective technique to be applied to a microprocessor which executes a program written by object-oriented language, for example, to an effective technique to be utilized in a storage control system in a microprocessor which acts in language called smalltalk.
In programming using the object-oriented language, a program is constituted in a unit of object where data and procedure for the data are made one body. Transmission of message to the object is the basic operation. When the program is executed, reading of the object occurs frequently. Consequently, in the system where the program written by the object-oriented language runs, the storage control of the object and the reading system of the object are important in order to determine the execution speed.
FIG. 1 shows an example of a storage control system of the prior art in a microprocessor acting in program written by smalltalk. In the smalltalk, that which plays the role of a memory in a usual system is called a heap HP. When the heap HP is accessed by an object pointer, a table called an object table OT is first accessed by a logic address called Oop. Thereby a physical address and offset contained in an entry ENT in the object table OT are obtained. As a result, using the physical address and the offset, it can be determined where substance (object) indicated by the Oop exists in the heap HP. The object table OT, the heap HP and the like are a part of the main memory MEM.
In the prior art, structure of each entry area of an object table in a microprocessor for smalltalk as shown in FIG. 2 is composed of a reference count area RC storing the reference number of the object, a segment field SG representing the physical address of the object and an offset field OF (refer to "Iwanami Course, Microelectronics 7, Programming Language and VLSI" pp. 152-158, published by Iwanami Shoten K.K. in June 24, 1985).
In the object-oriented language, subsequent operations during the program execution are not known until a class field of the accessed object (a field indicating a class to which the object belongs) is identified. Consequently, in the indirect access system using the object table in the prior art, in order to determine the (subsequent operations, the object table must be first quoted and the object be accessed by the physical address obtained from the table and the class be referred to. In other words, since the subsequent operation (called "method" in the smalltalk) quotes the table (being a method dictionary) from the class of the object at the receiving side and the selector of the message so as to search the method, the class of the object is necessary. Moreover, it has been performed by a macro program. Consequently, this method is disadvantageous in that the time until the determination of the operation is long and the execution speed of the program is slow.